home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / netscape / skyppp.exe / WINSOCK / LOGIN.CMD < prev    next >
OS/2 REXX Batch file  |  1996-04-30  |  2KB  |  107 lines

  1. #
  2. # SkyLink login script v2.1 - by Luca Spada
  3. #
  4.  
  5. ##############################################################################
  6.  
  7.  
  8. if ![load $username]
  9.   if [username "Inserisci la login PPP"]
  10.     save $username
  11.   end
  12. end
  13. if ![load $password]
  14.   if [password "Inserisci la password PPP"]
  15.     save $password
  16.   end
  17. end
  18.  
  19. $modemsetup = "x3"
  20. $userprompt = "ogin:"
  21. $passprompt = "assword:"
  22.  
  23. %attempts = 10
  24. #
  25. #
  26. #----------------------------------------------------------
  27. #
  28. # initialize modem
  29. #
  30. display \n\n"Inizializzo il modem..."
  31. output "atz"\13
  32. if ! [input 10 OK\n]
  33.   display "Il modem non risponde!"\n
  34.   abort
  35. end
  36. display "OK!"\n
  37. #
  38. # setup our modem commands
  39. #
  40. output "at"$modemsetup\13
  41. input 10 OK\n
  42. #
  43. # send phone number
  44. #
  45. display "Mi sto collegando con SkyLink..."
  46. %n = 0
  47. repeat
  48.   if %n = %attempts
  49.     display "Non sono riuscito a collegarmi"\n
  50.     abort
  51.   end
  52.  
  53.  
  54. ######################################################
  55. # Cambiare questa riga in base al numero di telefono #
  56. ######################################################
  57.  
  58. # Composizione numero in modalita' pulse (meccanica)
  59.   output "atdp284343"\13
  60. # Composizione numero in modalita' toni (multifrequenza)
  61. # output "atdt0332284343"\13
  62.  
  63. ######################################################
  64.  
  65.  
  66.  
  67.   %ok = [input 60 CONNECT]
  68.   %n = %n + 1
  69. until %ok
  70. input 10 \n
  71. #
  72. #  wait till it's safe to send because some modem's hang up
  73. #  if you transmit during the connection phase
  74. #
  75. wait 30 dcd
  76. display "OK!"\n
  77. #
  78. # now prod the terminal server
  79. #
  80. display "Connessione OK, entro in SkyLink..."
  81. output \13
  82. #
  83. #  wait for the username prompt
  84. #
  85.  
  86. if [input 3 "name:"]
  87.    output "skylink"\13
  88. end 
  89.  
  90. input 30 $userprompt
  91. output $username\13
  92. #
  93. # and the password
  94. #
  95. input 30 $passprompt
  96. output $password\13
  97. #
  98. # we are now logged in
  99. #
  100. # input 30 $prompt
  101.  
  102. display \n\n
  103. display "Connessione PPP attivata, iconifica Winsock e lancia"\n
  104. display "le applicazioni Internet (es. Netscape)"\n\n
  105. sleep 1
  106.  
  107.